A complex processor, such as the PA-RISC processor by Hewlett-Packard, includes configurable resources that provide functionality within the processor. The controls for these resources are accessed by registers within the processor. For example, the PA-RISC processor contains more than fifty-seven, double-word, sixty-four bit remote diagnose registers (“RDRs”) that control operation of the various resources within the processor (e.g., call return stack control, branch target cache (“BTC”) strobe delay). These resource controls require protection from miss-use to avoid catastrophic mal-function of the processor. In an example of illustrative operation, a test engineer creates software that, when executed by the processor, verifies the processor operability by modifying the RDRs to control and test the processor resources.
Source code for the software is most often written in an assembly language, which is assembled into executable code for execution by the processor. The specification of control fields and control field locations within the RDRs is, in many cases, fragmented. For example, one resource may have many attributes, each of which is controlled by a control field in an RDR; the control fields for a resource may also be distributed over more than one RDR. One RDR may also contain more than one control field. Accordingly, in the source code, test engineers use #define statements to specify the parameters of each control field, such as: the RDR, a start bit of the associated control field, the length of the control field, default values, etc. The diversity of these parameters results in fragmented source code that is difficult to create, debug and maintain.
During development of the processor, control field locations may change; during debug of the processor, the default values for a control field often change. These changes require modification of corresponding locations in the source code. Further, re-definition of resource attributes also results in the re-definition of potentially multiple #define statements for each resource. Where multiple #define statements are used to define each control field, the readability of the source code is reduced because each #define statement requires a unique name, resulting in an undesirably long and/or cryptic name for each #define statement.